package za.org.jcicada.genss.sensor.messages;

import za.org.jcicada.genss.messages.BaseMessage;
import za.org.jcicada.genss.sensor.ISensorValue;
import za.org.jcicada.genss.sensor.SensorURN;

/**
 * UpdateSensorInform message class.
 * @author rcrida
 */
public class UpdateSensorInform extends BaseMessage {
    
    /**
     * Class serialization version id.
     */
    private static final long serialVersionUID = 1L;
    
    /**
     * The URI of the sensor that this update corresponds with
     */
    private SensorURN sensorURN;
    
    /**
     * The status, value and timestamp of the update
     */
    private ISensorValue value;

    /**
     * Construct message
     * @param sensorURN the sensor URI
     * @param value the details of the current value
     */
    public UpdateSensorInform(SensorURN sensorURN, ISensorValue value) {
        this.sensorURN = sensorURN;
        this.value = value;
    }
    
    public SensorURN getSensorURN() {
        return sensorURN;
    }
    
    public ISensorValue getValue() {
        return value;
    }

}
